package com.kkb.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by on 2019/5/16.
 */
@RestController
public class Auth1Controller {

    // sso测试接口
    @GetMapping("/userinfo")
    public Authentication getUser(Authentication authentication) {

        System.out.println("用户名：======================="+authentication.getName());

        return authentication;

    }

}
